package com.example.myapplication.adapter;

import android.content.Context;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.PagerAdapter;

import java.util.List;

public class MyPagerAdapter extends FragmentPagerAdapter {
    Context context;
    List<Fragment> fragments;
public MyPagerAdapter(@NonNull FragmentManager fm,List<Fragment> fragments){
    super(fm);
    this.fragments = fragments;
}
    @NonNull
    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
